package com.course.delegate;

import java.io.FileNotFoundException;
import java.util.Vector;

import com.course.bean.AnnouncementTo;
import com.course.bean.CourseTo;
import com.course.exception.ConnectionException;
import com.course.exception.DataNotFoundException;
import com.course.exception.LoginException;
import com.course.serviceI.CourseServiceI;
import com.course.serviceImpl.CourseServiceImpl;

public class CourseMgrDelegate {
	CourseServiceI csi=new CourseServiceImpl();
	public boolean insertCourse(CourseTo cb)throws LoginException,ConnectionException{
		return csi.insertCourse(cb);
	}
 public boolean deleteCourse(int courseid)throws LoginException,ConnectionException {
		return csi.deleteCourse(courseid);
		}
	public Vector<CourseTo> viewCourse()throws DataNotFoundException{
		return csi.viewCourse();
		}
	public Vector<CourseTo> viewCourseAt(int cid)throws DataNotFoundException{
		return csi.viewCourseAt(cid);
	}
	public boolean updateCourse(CourseTo cb)throws LoginException,ConnectionException{
		return csi.updateCourse(cb);
	}
   public boolean insertAnnouncement(AnnouncementTo ab)throws LoginException,ConnectionException{
		return csi.insertAnnouncement(ab);
	}
	public Vector<AnnouncementTo> viewAnnouncement(int cid)throws DataNotFoundException{
		return csi.viewAnnouncement(cid);
	}
	public Vector<AnnouncementTo> viewAllAnnouncement()throws DataNotFoundException{
		return csi.viewAllAnnouncement();
	}
	public boolean insertMaterial(CourseTo cb)throws FileNotFoundException, ConnectionException, LoginException{
		return csi.insertMaterial(cb);
	}
	public Vector<CourseTo> viewMaterial(String path,int cid)throws DataNotFoundException{
		return csi.viewMaterial(path, cid);
	}
	
	public Vector<CourseTo> getFaculty(int cid)throws DataNotFoundException{
		return csi.getFaculty(cid);
	}
	public Vector<CourseTo> getStudent(int cid)throws DataNotFoundException{
		return csi.getStudent(cid);
		}
}
